<?php
/**
*市场数据及分析
*/
//此脚本应该每10分执行一次,然后就把原来的额数据都保存了
$redis = new Redis();
  //连接服务器
  $redis->connect("localhost");
  //授权
  $redis->auth("redis=pwd@2016");

//地址栏传来的地址,根据此地址

$address=$_REQUEST['address'];

switch ($address) {
  case '北京博瑞祥星汽车销售有限公司':
    $hash='4S_MarketDirector_brxx';
    break;
  case '义乌市博奥汽车销售服务有限公司':
    $hash='4S_MarketDirector_ywba';
    break;
  case '江苏天奥汽车销售服务有限公司':
    $hash='4S_MarketDirector_jsta';
    break;
  case '广东粤奥汽车销售服务有限公司':
    $hash='4S_MarketDirector_gdya';
    break;
  case '辽宁鑫迪汽车销售服务有限公司':
    $hash='4S_MarketDirector_lnxd';
    break;
  case '成都新元素雅麓汽车销售服务有限公司':
    $hash='4S_MarketDirector_cdyl';
    break;
  case '云南驰泰汽车销售服务有限公司':
    $hash='4S_MarketDirector_ynct';
    break;
  case '宁夏奥立升汽车销售服务有限公司':
    $hash='4S_MarketDirector_nxals';
    break;
  case '陕西奥诚汽车销售服务有限公司':
    $hash='4S_MarketDirector_sxac';
    break;
}

$data=$redis->hmget($hash, array(
'allnow',
'allday',
'p9',
'p10',
'p11',
'p12',
'p13',
'p14',
'p15',
'p16',
'p17',
'p18',
'b9',
'b10',
'b11',
'b12',
'b13',
'b14',
'b15',
'b16',
'b17',
'b18',
'onep',
'twop',
'threep',
'fourp',
'fivep',
'sixp',
'sevenp',
'firstp',
'secondp',
'thirdp',
'fourthp',
'firstmonth',
'secondmonth',
'thirdmonth',
'fourthmonth',
'nowjk',
'yesdjk',
'onejk',
'twojk',
'threejk',
'fourjk',
'fivejk',
'sixjk',
'sevenjk',
'firstjk',
'secondjk',
'thirdjk',
'fourthjk',
'week',
'month',
'years',
'avgallday',
'avgweek',
'avgmonth',
'avgyears',
'daycountry',
'weekcountry',
'monthcountry',
'yearcountry',
));


$allnow=$data['allnow'];
$allday=$data['allday'];
$p9=$data['p9'];
$p10=$data['p10'];
$p11=$data['p11'];
$p12=$data['p12'];
$p13=$data['p13'];
$p14=$data['p14'];
$p15=$data['p15'];
$p16=$data['p16'];
$p17=$data['p17'];
$p18=$data['p18'];
$b9=$data['b9'];
$b10=$data['b10'];
$b11=$data['b11'];
$b12=$data['b12'];
$b13=$data['b13'];
$b14=$data['b14'];
$b15=$data['b15'];
$b16=$data['b16'];
$b17=$data['b17'];
$b18=$data['b18'];
$onep=$data['onep'];
$twop=$data['twop'];
$threep=$data['threep'];
$fourp=$data['fourp'];
$fivep=$data['fivep'];
$sixp=$data['sixp'];
$sevenp=$data['sevenp'];
$firstp=$data['firstp'];
$secondp=$data['secondp'];
$thirdp=$data['thirdp'];
$fourthp=$data['fourthp'];
$firstmonth=$data['firstmonth'];
$secondmonth=$data['secondmonth'];
$thirdmonth=$data['thirdmonth'];
$fourthmonth=$data['fourthmonth'];
$nowjk=$data['nowjk'];
$yesdjk=$data['yesdjk'];
$onejk=$data['onejk'];
$twojk=$data['twojk'];
$threejk=$data['threejk'];
$fourjk=$data['fourjk'];
$fivejk=$data['fivejk'];
$sixjk=$data['sixjk'];
$sevenjk=$data['sevenjk'];
$firstjk=$data['firstjk'];
$secondjk=$data['secondjk'];
$thirdjk=$data['thirdjk'];
$fourthjk=$data['fourthjk'];
$week=$data['week'];
$month=$data['month'];
$years=$data['years'];
$avgallday=$data['avgallday'];
$avgweek=$data['avgweek'];
$avgmonth=$data['avgmonth'];
$avgyears=$data['avgyears'];
$daycountry=$data['daycountry'];
$weekcountry=$data['weekcountry'];
$monthcountry=$data['monthcountry'];
$yearcountry=$data['yearcountry'];




// print_r($data);
// exit;



require('./view/iwocar5/4S_MarketDirector.html');

 ?>
